﻿package edu.chds.data.php{	import flash.events.*;	import flash.net.*;		public class PhpGrabber extends EventDispatcher	{		private var phpFile:String;		private var remoteFile:String;		private var request:URLRequest;		private var vars:URLVariables = new URLVariables();		private var loader:URLLoader = new URLLoader();		public var data:String;				public function PhpGrabber()		{								}		public function load(php:String, remote:String):void {			phpFile = php;			remoteFile = remote;			request = new URLRequest(phpFile);			vars.fileName = remoteFile;			request.data = vars;			request.method = URLRequestMethod.POST;			loader.load(request);			loader.addEventListener(Event.COMPLETE, contentLoaded);		}		private function contentLoaded(e:Event):void {
			data = e.target.data;			dispatchEvent(new Event(Event.COMPLETE));
		}	}}